import { makeAutoObservable } from 'mobx';
import { createContext } from 'react';

export class CouterStore {
	count = 0;

	constructor() {
		makeAutoObservable(this);
	}

	inc(value: number) {
		this.count += value;
	}

	get total() {
		return this.count * 10;
	}
}

export default createContext<CouterStore>(new CouterStore());
